package com.community.admin.base_infomation.validator;

import lombok.Data;

import java.io.Serializable;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author Aiden
 * @date 2021/11/15
 */
@Data
public class BaseInfomationValid implements Serializable {
    private Long id;
    @NotEmpty(message = "小区名字不能为空")
    private String name;
    @NotEmpty(message = "小区负责人不能为空")
    private String responsible_name;
    @Pattern(regexp = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$", message = "手机号码格式不正确")
    private String phone;
    @Digits(integer = 12, fraction = 2, message = "社区目前封闭状态不是数字")
    private Integer open_status;
}